home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / dev / lang / SmallEiffel.lha / SmallEiffel / bin_c / compile_to_jvm7.c < prev    next >
C/C++ Source or Header  |  1998-12-22  |  20KB  |  959 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.79)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "compile_to_jvm.h"
  9.  
  10.  
  11. void r323add_last(T323* C,T0* a1){
  12. T2 _new_capacity=0;
  13. /*[IF*/
  14. if(((C)->_capacity/*4*/)<((r323count(C))+(1))){
  15. /*[IF*/
  16. if(((C)->_capacity/*4*/)==(0)){
  17. C->_capacity=16;
  18. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  19. }
  20. else{
  21. _new_capacity=(2)*((C)->_capacity/*4*/);
  22. C->_storage=r324realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  23. C->_capacity=_new_capacity;
  24. }
  25. /*FI]*/
  26. }
  27. /*FI]*/
  28. C->_upper=((C)->_upper/*8*/)+(1);
  29. /*[IRF3.6put*/{T323* C1=C;
  30. T0* b1=a1;
  31. T2 b2=(C)->_upper/*8*/;
  32. ((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
  33. }/*]*/
  34. }
  35.  
  36.  
  37. T0* r323item(T323* C,T2 a1){
  38. T0* R=NULL;
  39. R=((C)->_storage/*0*/)[(a1)-((C)->_lower/*12*/)];
  40. return R;
  41. }
  42.  
  43.  
  44. T2 r323count(T323* C){
  45. T2 R=0;
  46. R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  47. return R;
  48. }
  49. /*No:ARRAY[EXPORT_ITEM].lower*/
  50. /*No:ARRAY[EXPORT_ITEM].upper*/
  51. /*No:ARRAY[EXPORT_ITEM].capacity*/
  52. /*No:ARRAY[EXPORT_ITEM].put*/
  53. /*No:ARRAY[EXPORT_ITEM].storage*/
  54.  
  55.  
  56. void r91add_last(T91* C,T0* a1){
  57. T2 _new_capacity=0;
  58. /*[IF*/
  59. if(((C)->_capacity/*4*/)<((r91count(C))+(1))){
  60. /*[IF*/
  61. if(((C)->_capacity/*4*/)==(0)){
  62. C->_capacity=16;
  63. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  64. }
  65. else{
  66. _new_capacity=(2)*((C)->_capacity/*4*/);
  67. C->_storage=r92realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  68. C->_capacity=_new_capacity;
  69. }
  70. /*FI]*/
  71. }
  72. /*FI]*/
  73. C->_upper=((C)->_upper/*8*/)+(1);
  74. /*[IRF3.6put*/{T91* C1=C;
  75. T0* b1=a1;
  76. T2 b2=(C)->_upper/*8*/;
  77. ((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
  78. }/*]*/
  79. }
  80.  
  81.  
  82. T0* r91item(T91* C,T2 a1){
  83. T0* R=NULL;
  84. R=((C)->_storage/*0*/)[(a1)-((C)->_lower/*12*/)];
  85. return R;
  86. }
  87.  
  88.  
  89. T2 r91count(T91* C){
  90. T2 R=0;
  91. R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  92. return R;
  93. }
  94. /*No:ARRAY[RENAME_PAIR].lower*/
  95. /*No:ARRAY[RENAME_PAIR].upper*/
  96. /*No:ARRAY[RENAME_PAIR].capacity*/
  97. /*No:ARRAY[RENAME_PAIR].put*/
  98. /*No:ARRAY[RENAME_PAIR].storage*/
  99.  
  100.  
  101. T0* r189twin(T189* C){
  102. T0* R=NULL;
  103. R=malloc(sizeof(*C));
  104. *((T189*)R)=M189;
  105. r189copy(((T189*)R),((T0*)C));
  106. return R;
  107. }
  108. /*No:ARRAY[LOCAL_NAME1].clear_all*/
  109.  
  110.  
  111. void r189add_last(T189* C,T0* a1){
  112. T2 _new_capacity=0;
  113. /*[IF*/
  114. if(((C)->_capacity/*8*/)<((r189count(C))+(1))){
  115. /*[IF*/
  116. if(((C)->_capacity/*8*/)==(0)){
  117. C->_capacity=16;
  118. C->_storage=calloc((C)->_capacity/*8*/,sizeof(T0*));
  119. }
  120. else{
  121. _new_capacity=(2)*((C)->_capacity/*8*/);
  122. C->_storage=r190realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  123. C->_capacity=_new_capacity;
  124. }
  125. /*FI]*/
  126. }
  127. /*FI]*/
  128. C->_upper=((C)->_upper/*12*/)+(1);
  129. /*[IRF3.6put*/{T189* C1=C;
  130. T0* b1=a1;
  131. T2 b2=(C)->_upper/*12*/;
  132. ((C1)->_storage/*4*/)[(b2)-((C1)->_lower/*16*/)]=(b1);
  133. }/*]*/
  134. }
  135. /*No:ARRAY[LOCAL_NAME1].set_all_with*/
  136.  
  137.  
  138. T0* r189item(T189* C,T2 a1){
  139. T0* R=NULL;
  140. R=((C)->_storage/*4*/)[(a1)-((C)->_lower/*16*/)];
  141. return R;
  142. }
  143.  
  144.  
  145. T2 r189count(T189* C){
  146. T2 R=0;
  147. R=(((C)->_upper/*12*/)-((C)->_lower/*16*/))+(1);
  148. return R;
  149. }
  150. /*No:ARRAY[LOCAL_NAME1].lower*/
  151.  
  152.  
  153. void r189make(T189* C,T2 a1,T2 a2){
  154. T2 _needed=0;
  155. C->_lower=a1;
  156. C->_upper=a2;
  157. _needed=((a2)-(a1))+(1);
  158. /*[IF*/
  159. if((_needed)>(0)){
  160. /*[IF*/
  161. if(((C)->_capacity/*8*/)<(_needed)){
  162. C->_storage=calloc(_needed,sizeof(T0*));
  163. C->_capacity=_needed;
  164. }
  165. else{
  166. /*[IRF3.6clear_all*/{T189* C1=C;
  167. T0* __value=NULL;
  168. /*[IRF3.6set_all_with*/{T189* C2=C1;
  169. T0* c1=__value;
  170. r190set_all_with((C2)->_storage/*4*/,c1,((C2)->_upper/*12*/)-((C2)->_lower/*16*/));
  171. }/*]*/
  172. }/*]*/
  173. }
  174. /*FI]*/
  175. }
  176. /*FI]*/
  177. }
  178. /*No:ARRAY[LOCAL_NAME1].upper*/
  179.  
  180.  
  181. void r189copy(T189* C,T0* a1){
  182. T2 _needed_capacity=0;
  183. C->_lower=(((T189*)a1))->_lower/*16*/;
  184. C->_upper=(((T189*)a1))->_upper/*12*/;
  185. _needed_capacity=(((C)->_upper/*12*/)-((C)->_lower/*16*/))+(1);
  186. /*[IF*/
  187. if(((C)->_capacity/*8*/)<(_needed_capacity)){
  188. C->_capacity=_needed_capacity;
  189. C->_storage=calloc((C)->_capacity/*8*/,sizeof(T0*));
  190. }
  191. /*FI]*/
  192. /*[IF*/
  193. if((_needed_capacity)>(0)){
  194. r190copy_from((C)->_storage/*4*/,(((T189*)a1))->_storage/*4*/,(_needed_capacity)-(1));
  195. }
  196. /*FI]*/
  197. }
  198. /*No:ARRAY[LOCAL_NAME1].capacity*/
  199. /*No:ARRAY[LOCAL_NAME1].put*/
  200. /*No:ARRAY[LOCAL_NAME1].storage*/
  201.  
  202.  
  203. void r313add_last(T313* C,T0* a1){
  204. T2 _new_capacity=0;
  205. /*[IF*/
  206. if(((C)->_capacity/*4*/)<((r313count(C))+(1))){
  207. /*[IF*/
  208. if(((C)->_capacity/*4*/)==(0)){
  209. C->_capacity=16;
  210. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  211. }
  212. else{
  213. _new_capacity=(2)*((C)->_capacity/*4*/);
  214. C->_storage=r314realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  215. C->_capacity=_new_capacity;
  216. }
  217. /*FI]*/
  218. }
  219. /*FI]*/
  220. C->_upper=((C)->_upper/*8*/)+(1);
  221. /*[IRF3.6put*/{T313* C1=C;
  222. T0* b1=a1;
  223. T2 b2=(C)->_upper/*8*/;
  224. ((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
  225. }/*]*/
  226. }
  227.  
  228.  
  229. T0* r313item(T313* C,T2 a1){
  230. T0* R=NULL;
  231. R=((C)->_storage/*0*/)[(a1)-((C)->_lower/*12*/)];
  232. return R;
  233. }
  234.  
  235.  
  236. T2 r313count(T313* C){
  237. T2 R=0;
  238. R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  239. return R;
  240. }
  241. /*No:ARRAY[DECLARATION].lower*/
  242. /*No:ARRAY[DECLARATION].upper*/
  243. /*No:ARRAY[DECLARATION].capacity*/
  244. /*No:ARRAY[DECLARATION].put*/
  245. /*No:ARRAY[DECLARATION].storage*/
  246.  
  247.  
  248. void r284add_last(T284* C,T0* a1){
  249. T2 _new_capacity=0;
  250. /*[IF*/
  251. if(((C)->_capacity/*4*/)<((r284count(C))+(1))){
  252. /*[IF*/
  253. if(((C)->_capacity/*4*/)==(0)){
  254. C->_capacity=16;
  255. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  256. }
  257. else{
  258. _new_capacity=(2)*((C)->_capacity/*4*/);
  259. C->_storage=r286realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  260. C->_capacity=_new_capacity;
  261. }
  262. /*FI]*/
  263. }
  264. /*FI]*/
  265. C->_upper=((C)->_upper/*8*/)+(1);
  266. /*[IRF3.6put*/{T284* C1=C;
  267. T0* b1=a1;
  268. T2 b2=(C)->_upper/*8*/;
  269. ((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
  270. }/*]*/
  271. }
  272.  
  273.  
  274. T0* r284item(T284* C,T2 a1){
  275. T0* R=NULL;
  276. R=((C)->_storage/*0*/)[(a1)-((C)->_lower/*12*/)];
  277. return R;
  278. }
  279.  
  280.  
  281. T2 r284count(T284* C){
  282. T2 R=0;
  283. R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  284. return R;
  285. }
  286. /*No:ARRAY[FORMAL_GENERIC_ARG].lower*/
  287. /*No:ARRAY[FORMAL_GENERIC_ARG].upper*/
  288. /*No:ARRAY[FORMAL_GENERIC_ARG].capacity*/
  289. /*No:ARRAY[FORMAL_GENERIC_ARG].put*/
  290. /*No:ARRAY[FORMAL_GENERIC_ARG].storage*/
  291. /*No:ARRAY[RUN_FEATURE_2].clear_all*/
  292.  
  293.  
  294. void r54force(T54* C,T0* a1,T2 a2){
  295. /*[IF*/
  296. if(((C)->_upper/*12*/)<(a2)){
  297. r54resize(C,(C)->_lower/*16*/,a2);
  298. }
  299.  else if((a2)<((C)->_lower/*16*/)){
  300. r54resize(C,a2,(C)->_upper/*12*/);
  301. }
  302. /*FI]*/
  303. /*[IRF3.6put*/{T54* C1=C;
  304. T0* b1=a1;
  305. T2 b2=a2;
  306. ((C1)->_storage/*4*/)[(b2)-((C1)->_lower/*16*/)]=(b1);
  307. }/*]*/
  308. }
  309.  
  310.  
  311. void r54add_last(T54* C,T0* a1){
  312. T2 _new_capacity=0;
  313. /*[IF*/
  314. if(((C)->_capacity/*8*/)<((r54count(C))+(1))){
  315. /*[IF*/
  316. if(((C)->_capacity/*8*/)==(0)){
  317. C->_capacity=16;
  318. C->_storage=calloc((C)->_capacity/*8*/,sizeof(T0*));
  319. }
  320. else{
  321. _new_capacity=(2)*((C)->_capacity/*8*/);
  322. C->_storage=r334realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  323. C->_capacity=_new_capacity;
  324. }
  325. /*FI]*/
  326. }
  327. /*FI]*/
  328. C->_upper=((C)->_upper/*12*/)+(1);
  329. /*[IRF3.6put*/{T54* C1=C;
  330. T0* b1=a1;
  331. T2 b2=(C)->_upper/*12*/;
  332. ((C1)->_storage/*4*/)[(b2)-((C1)->_lower/*16*/)]=(b1);
  333. }/*]*/
  334. }
  335. /*No:ARRAY[RUN_FEATURE_2].set_all_with*/
  336.  
  337.  
  338. T0* r54item(T54* C,T2 a1){
  339. T0* R=NULL;
  340. R=((C)->_storage/*4*/)[(a1)-((C)->_lower/*16*/)];
  341. return R;
  342. }
  343.  
  344.  
  345. T2 r54count(T54* C){
  346. T2 R=0;
  347. R=(((C)->_upper/*12*/)-((C)->_lower/*16*/))+(1);
  348. return R;
  349. }
  350. /*No:ARRAY[RUN_FEATURE_2].lower*/
  351.  
  352.  
  353. void r54resize(T54* C,T2 a1,T2 a2){
  354. T2 _intersize=0;
  355. T2 _offset=0;
  356. T2 _needed=0;
  357. _needed=((a2)-(a1))+(1);
  358. /*[IF*/
  359. if((_needed)>(0)){
  360. /*[IF*/
  361. if((_needed)>((C)->_capacity/*8*/)){
  362. /*[IF*/
  363. if(((C)->_capacity/*8*/)==(0)){
  364. C->_storage=calloc(_needed,sizeof(T0*));
  365. C->_capacity=_needed;
  366. }
  367. else{
  368. C->_storage=r334realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_needed);
  369. C->_capacity=_needed;
  370. }
  371. /*FI]*/
  372. }
  373. /*FI]*/
  374. _offset=((C)->_lower/*16*/)-(a1);
  375. _intersize=((r2min(a2,(C)->_upper/*12*/))-(r2max(a1,(C)->_lower/*16*/)))+(1);
  376. /*[IF*/
  377. if((_intersize)>(0)){
  378. /*[IF*/
  379. if((_offset)==(0)){
  380. /*[IF*/
  381. if((_intersize)<(_needed)){
  382. r334clear((C)->_storage/*4*/,_intersize,(_needed)-(1));
  383. }
  384. /*FI]*/
  385. }
  386.  else if((_offset)<(0)){
  387. r334move((C)->_storage/*4*/,-(_offset),((_intersize)-(_offset))-(1),_offset);
  388. /*[IF*/
  389. if((_intersize)<(_needed)){
  390. r334clear((C)->_storage/*4*/,_intersize,(_needed)-(1));
  391. }
  392. /*FI]*/
  393. }
  394. else{
  395. r334move((C)->_storage/*4*/,0,(_intersize)-(1),_offset);
  396. r334clear((C)->_storage/*4*/,0,(_offset)-(1));
  397. /*[IF*/
  398. if(((_intersize)+(_offset))<(_needed)){
  399. r334clear((C)->_storage/*4*/,(_intersize)+(_offset),(_needed)-(1));
  400. }
  401. /*FI]*/
  402. }
  403. /*FI]*/
  404. }
  405. else{
  406. r334clear((C)->_storage/*4*/,0,(_needed)-(1));
  407. }
  408. /*FI]*/
  409. }
  410. /*FI]*/
  411. C->_lower=a1;
  412. C->_upper=a2;
  413. }
  414.  
  415.  
  416. void r54make(T54* C,T2 a1,T2 a2){
  417. T2 _needed=0;
  418. C->_lower=a1;
  419. C->_upper=a2;
  420. _needed=((a2)-(a1))+(1);
  421. /*[IF*/
  422. if((_needed)>(0)){
  423. /*[IF*/
  424. if(((C)->_capacity/*8*/)<(_needed)){
  425. C->_storage=calloc(_needed,sizeof(T0*));
  426. C->_capacity=_needed;
  427. }
  428. else{
  429. /*[IRF3.6clear_all*/{T54* C1=C;
  430. T0* __value=NULL;
  431. /*[IRF3.6set_all_with*/{T54* C2=C1;
  432. T0* c1=__value;
  433. r334set_all_with((C2)->_storage/*4*/,c1,((C2)->_upper/*12*/)-((C2)->_lower/*16*/));
  434. }/*]*/
  435. }/*]*/
  436. }
  437. /*FI]*/
  438. }
  439. /*FI]*/
  440. }
  441. /*No:ARRAY[RUN_FEATURE_2].upper*/
  442.  
  443.  
  444. void r54swap(T54* C,T2 a1,T2 a2){
  445. T0* _tmp=NULL;
  446. _tmp=r54item(C,a1);
  447. /*[IRF3.6put*/{T54* C1=C;
  448. T0* b1=r54item(C,a2);
  449. T2 b2=a1;
  450. ((C1)->_storage/*4*/)[(b2)-((C1)->_lower/*16*/)]=(b1);
  451. }/*]*/
  452. /*[IRF3.6put*/{T54* C1=C;
  453. T0* b1=_tmp;
  454. T2 b2=a2;
  455. ((C1)->_storage/*4*/)[(b2)-((C1)->_lower/*16*/)]=(b1);
  456. }/*]*/
  457. }
  458. /*No:ARRAY[RUN_FEATURE_2].capacity*/
  459. /*No:ARRAY[RUN_FEATURE_2].put*/
  460. /*No:ARRAY[RUN_FEATURE_2].storage*/
  461.  
  462.  
  463. void r356with_capacity(T356* C,T2 a1){
  464. /*[IF*/
  465. if(((C)->_capacity/*8*/)<(a1)){
  466. C->_storage=calloc(a1,sizeof(T0*));
  467. C->_capacity=a1;
  468. }
  469. /*FI]*/
  470. C->_upper=-(1);
  471. }
  472. /*No:FIXED_ARRAY[RUN_FEATURE_9].clear_all*/
  473.  
  474.  
  475. void r356add_last(T356* C,T0* a1){
  476. T2 _new_capacity=0;
  477. /*[IF*/
  478. if((((C)->_upper/*12*/)+(1))<=(((C)->_capacity/*8*/)-(1))){
  479. C->_upper=((C)->_upper/*12*/)+(1);
  480. }
  481.  else if(((C)->_capacity/*8*/)==(0)){
  482. C->_storage=calloc(2,sizeof(T0*));
  483. C->_capacity=2;
  484. C->_upper=0;
  485. }
  486. else{
  487. _new_capacity=(2)*((C)->_capacity/*8*/);
  488. C->_storage=r358realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  489. C->_capacity=_new_capacity;
  490. C->_upper=((C)->_upper/*12*/)+(1);
  491. }
  492. /*FI]*/
  493. /*[IRF3.5put*/((C)->_storage/*4*/)[(C)->_upper/*12*/]=(a1);
  494. /*]*/
  495. }
  496. /*No:FIXED_ARRAY[RUN_FEATURE_9].set_all_with*/
  497. /*No:FIXED_ARRAY[RUN_FEATURE_9].item*/
  498.  
  499.  
  500. T6 r356valid_index(T356* C,T2 a1){
  501. T6 R=0;
  502. R=((0)<=(a1))&&((a1)<=((C)->_upper/*12*/));
  503. return R;
  504. }
  505. /*No:FIXED_ARRAY[RUN_FEATURE_9].count*/
  506. /*No:FIXED_ARRAY[RUN_FEATURE_9].lower*/
  507.  
  508.  
  509. void r356resize(T356* C,T2 a1){
  510. T0* _elt_default=NULL;
  511. T2 _i=0;
  512. T2 _new_capacity=0;
  513. /*[IF*/
  514. if((a1)<=(/*(IRF4.6count*/((C)->_upper/*12*/)+(1)/*)*/)){
  515. C->_upper=(a1)-(1);
  516. }
  517. else{
  518. _new_capacity=a1;
  519. /*[IF*/
  520. if(((C)->_capacity/*8*/)<(_new_capacity)){
  521. /*[IF*/
  522. if(((C)->_capacity/*8*/)==(0)){
  523. C->_storage=calloc(_new_capacity,sizeof(T0*));
  524. }
  525. else{
  526. C->_storage=r358realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  527. }
  528. /*FI]*/
  529. C->_capacity=_new_capacity;
  530. }
  531. /*FI]*/
  532. _new_capacity=(C)->_upper/*12*/;
  533. C->_upper=(a1)-(1);
  534. _i=(C)->_upper/*12*/;
  535. while (!((_i)==(_new_capacity))) {
  536. /*[IRF3.5put*/((C)->_storage/*4*/)[_i]=(_elt_default);
  537. /*]*/
  538. _i=(_i)-(1);
  539. }
  540. }
  541. /*FI]*/
  542. }
  543.  
  544.  
  545. void r356make(T356* C,T2 a1){
  546. /*[IF*/
  547. if((a1)==(0)){
  548. C->_upper=-(1);
  549. }
  550.  else if(((C)->_capacity/*8*/)==(0)){
  551. C->_storage=calloc(a1,sizeof(T0*));
  552. C->_capacity=a1;
  553. C->_upper=(a1)-(1);
  554. }
  555.  else if(((C)->_capacity/*8*/)<(a1)){
  556. C->_storage=calloc(a1,sizeof(T0*));
  557. C->_capacity=a1;
  558. C->_upper=(a1)-(1);
  559. }
  560. else{
  561. C->_upper=(a1)-(1);
  562. /*[IRF3.6clear_all*/{T356* C1=C;
  563. T0* __value=NULL;
  564. /*[IRF3.6set_all_with*/{T356* C2=C1;
  565. T0* c1=__value;
  566. r358set_all_with((C2)->_storage/*4*/,c1,(C2)->_upper/*12*/);
  567. }/*]*/
  568. }/*]*/
  569. }
  570. /*FI]*/
  571. }
  572.  
  573.  
  574. T6 r356fast_has(T356* C,T0* a1){
  575. T6 R=0;
  576. R=r356valid_index(C,r356fast_index_of(C,a1));
  577. return R;
  578. }
  579.  
  580.  
  581. T2 r356fast_index_of(T356* C,T0* a1){
  582. T2 R=0;
  583. R=r358fast_index_of((C)->_storage/*4*/,a1,(C)->_upper/*12*/);
  584. return R;
  585. }
  586. /*No:FIXED_ARRAY[RUN_FEATURE_9].upper*/
  587. /*No:FIXED_ARRAY[RUN_FEATURE_9].clear*/
  588. /*No:FIXED_ARRAY[RUN_FEATURE_9].capacity*/
  589. /*No:FIXED_ARRAY[RUN_FEATURE_9].put*/
  590. /*No:FIXED_ARRAY[RUN_FEATURE_9].storage*/
  591.  
  592.  
  593. void r352with_capacity(T352* C,T2 a1){
  594. /*[IF*/
  595. if(((C)->_capacity/*8*/)<(a1)){
  596. C->_storage=calloc(a1,sizeof(T0*));
  597. C->_capacity=a1;
  598. }
  599. /*FI]*/
  600. C->_upper=-(1);
  601. }
  602. /*No:FIXED_ARRAY[RUN_FEATURE_6].clear_all*/
  603.  
  604.  
  605. void r352add_last(T352* C,T0* a1){
  606. T2 _new_capacity=0;
  607. /*[IF*/
  608. if((((C)->_upper/*12*/)+(1))<=(((C)->_capacity/*8*/)-(1))){
  609. C->_upper=((C)->_upper/*12*/)+(1);
  610. }
  611.  else if(((C)->_capacity/*8*/)==(0)){
  612. C->_storage=calloc(2,sizeof(T0*));
  613. C->_capacity=2;
  614. C->_upper=0;
  615. }
  616. else{
  617. _new_capacity=(2)*((C)->_capacity/*8*/);
  618. C->_storage=r353realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  619. C->_capacity=_new_capacity;
  620. C->_upper=((C)->_upper/*12*/)+(1);
  621. }
  622. /*FI]*/
  623. /*[IRF3.5put*/((C)->_storage/*4*/)[(C)->_upper/*12*/]=(a1);
  624. /*]*/
  625. }
  626. /*No:FIXED_ARRAY[RUN_FEATURE_6].set_all_with*/
  627. /*No:FIXED_ARRAY[RUN_FEATURE_6].item*/
  628.  
  629.  
  630. T6 r352valid_index(T352* C,T2 a1){
  631. T6 R=0;
  632. R=((0)<=(a1))&&((a1)<=((C)->_upper/*12*/));
  633. return R;
  634. }
  635. /*No:FIXED_ARRAY[RUN_FEATURE_6].lower*/
  636. /*No:FIXED_ARRAY[RUN_FEATURE_6].count*/
  637.  
  638.  
  639. void r352resize(T352* C,T2 a1){
  640. T0* _elt_default=NULL;
  641. T2 _i=0;
  642. T2 _new_capacity=0;
  643. /*[IF*/
  644. if((a1)<=(/*(IRF4.6count*/((C)->_upper/*12*/)+(1)/*)*/)){
  645. C->_upper=(a1)-(1);
  646. }
  647. else{
  648. _new_capacity=a1;
  649. /*[IF*/
  650. if(((C)->_capacity/*8*/)<(_new_capacity)){
  651. /*[IF*/
  652. if(((C)->_capacity/*8*/)==(0)){
  653. C->_storage=calloc(_new_capacity,sizeof(T0*));
  654. }
  655. else{
  656. C->_storage=r353realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  657. }
  658. /*FI]*/
  659. C->_capacity=_new_capacity;
  660. }
  661. /*FI]*/
  662. _new_capacity=(C)->_upper/*12*/;
  663. C->_upper=(a1)-(1);
  664. _i=(C)->_upper/*12*/;
  665. while (!((_i)==(_new_capacity))) {
  666. /*[IRF3.5put*/((C)->_storage/*4*/)[_i]=(_elt_default);
  667. /*]*/
  668. _i=(_i)-(1);
  669. }
  670. }
  671. /*FI]*/
  672. }
  673.  
  674.  
  675. void r352make(T352* C,T2 a1){
  676. /*[IF*/
  677. if((a1)==(0)){
  678. C->_upper=-(1);
  679. }
  680.  else if(((C)->_capacity/*8*/)==(0)){
  681. C->_storage=calloc(a1,sizeof(T0*));
  682. C->_capacity=a1;
  683. C->_upper=(a1)-(1);
  684. }
  685.  else if(((C)->_capacity/*8*/)<(a1)){
  686. C->_storage=calloc(a1,sizeof(T0*));
  687. C->_capacity=a1;
  688. C->_upper=(a1)-(1);
  689. }
  690. else{
  691. C->_upper=(a1)-(1);
  692. /*[IRF3.6clear_all*/{T352* C1=C;
  693. T0* __value=NULL;
  694. /*[IRF3.6set_all_with*/{T352* C2=C1;
  695. T0* c1=__value;
  696. r353set_all_with((C2)->_storage/*4*/,c1,(C2)->_upper/*12*/);
  697. }/*]*/
  698. }/*]*/
  699. }
  700. /*FI]*/
  701. }
  702.  
  703.  
  704. T6 r352fast_has(T352* C,T0* a1){
  705. T6 R=0;
  706. R=r352valid_index(C,r352fast_index_of(C,a1));
  707. return R;
  708. }
  709.  
  710.  
  711. T2 r352fast_index_of(T352* C,T0* a1){
  712. T2 R=0;
  713. R=r353fast_index_of((C)->_storage/*4*/,a1,(C)->_upper/*12*/);
  714. return R;
  715. }
  716. /*No:FIXED_ARRAY[RUN_FEATURE_6].upper*/
  717. /*No:FIXED_ARRAY[RUN_FEATURE_6].clear*/
  718. /*No:FIXED_ARRAY[RUN_FEATURE_6].capacity*/
  719. /*No:FIXED_ARRAY[RUN_FEATURE_6].put*/
  720. /*No:FIXED_ARRAY[RUN_FEATURE_6].storage*/
  721.  
  722.  
  723. void r350with_capacity(T350* C,T2 a1){
  724. /*[IF*/
  725. if(((C)->_capacity/*8*/)<(a1)){
  726. C->_storage=calloc(a1,sizeof(T0*));
  727. C->_capacity=a1;
  728. }
  729. /*FI]*/
  730. C->_upper=-(1);
  731. }
  732. /*No:FIXED_ARRAY[RUN_FEATURE_5].clear_all*/
  733.  
  734.  
  735. void r350add_last(T350* C,T0* a1){
  736. T2 _new_capacity=0;
  737. /*[IF*/
  738. if((((C)->_upper/*12*/)+(1))<=(((C)->_capacity/*8*/)-(1))){
  739. C->_upper=((C)->_upper/*12*/)+(1);
  740. }
  741.  else if(((C)->_capacity/*8*/)==(0)){
  742. C->_storage=calloc(2,sizeof(T0*));
  743. C->_capacity=2;
  744. C->_upper=0;
  745. }
  746. else{
  747. _new_capacity=(2)*((C)->_capacity/*8*/);
  748. C->_storage=r351realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  749. C->_capacity=_new_capacity;
  750. C->_upper=((C)->_upper/*12*/)+(1);
  751. }
  752. /*FI]*/
  753. /*[IRF3.5put*/((C)->_storage/*4*/)[(C)->_upper/*12*/]=(a1);
  754. /*]*/
  755. }
  756. /*No:FIXED_ARRAY[RUN_FEATURE_5].set_all_with*/
  757. /*No:FIXED_ARRAY[RUN_FEATURE_5].item*/
  758.  
  759.  
  760. T6 r350valid_index(T350* C,T2 a1){
  761. T6 R=0;
  762. R=((0)<=(a1))&&((a1)<=((C)->_upper/*12*/));
  763. return R;
  764. }
  765. /*No:FIXED_ARRAY[RUN_FEATURE_5].lower*/
  766. /*No:FIXED_ARRAY[RUN_FEATURE_5].count*/
  767.  
  768.  
  769. void r350resize(T350* C,T2 a1){
  770. T0* _elt_default=NULL;
  771. T2 _i=0;
  772. T2 _new_capacity=0;
  773. /*[IF*/
  774. if((a1)<=(/*(IRF4.6count*/((C)->_upper/*12*/)+(1)/*)*/)){
  775. C->_upper=(a1)-(1);
  776. }
  777. else{
  778. _new_capacity=a1;
  779. /*[IF*/
  780. if(((C)->_capacity/*8*/)<(_new_capacity)){
  781. /*[IF*/
  782. if(((C)->_capacity/*8*/)==(0)){
  783. C->_storage=calloc(_new_capacity,sizeof(T0*));
  784. }
  785. else{
  786. C->_storage=r351realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  787. }
  788. /*FI]*/
  789. C->_capacity=_new_capacity;
  790. }
  791. /*FI]*/
  792. _new_capacity=(C)->_upper/*12*/;
  793. C->_upper=(a1)-(1);
  794. _i=(C)->_upper/*12*/;
  795. while (!((_i)==(_new_capacity))) {
  796. /*[IRF3.5put*/((C)->_storage/*4*/)[_i]=(_elt_default);
  797. /*]*/
  798. _i=(_i)-(1);
  799. }
  800. }
  801. /*FI]*/
  802. }
  803.  
  804.  
  805. void r350make(T350* C,T2 a1){
  806. /*[IF*/
  807. if((a1)==(0)){
  808. C->_upper=-(1);
  809. }
  810.  else if(((C)->_capacity/*8*/)==(0)){
  811. C->_storage=calloc(a1,sizeof(T0*));
  812. C->_capacity=a1;
  813. C->_upper=(a1)-(1);
  814. }
  815.  else if(((C)->_capacity/*8*/)<(a1)){
  816. C->_storage=calloc(a1,sizeof(T0*));
  817. C->_capacity=a1;
  818. C->_upper=(a1)-(1);
  819. }
  820. else{
  821. C->_upper=(a1)-(1);
  822. /*[IRF3.6clear_all*/{T350* C1=C;
  823. T0* __value=NULL;
  824. /*[IRF3.6set_all_with*/{T350* C2=C1;
  825. T0* c1=__value;
  826. r351set_all_with((C2)->_storage/*4*/,c1,(C2)->_upper/*12*/);
  827. }/*]*/
  828. }/*]*/
  829. }
  830. /*FI]*/
  831. }
  832.  
  833.  
  834. T6 r350fast_has(T350* C,T0* a1){
  835. T6 R=0;
  836. R=r350valid_index(C,r350fast_index_of(C,a1));
  837. return R;
  838. }
  839.  
  840.  
  841. T2 r350fast_index_of(T350* C,T0* a1){
  842. T2 R=0;
  843. R=r351fast_index_of((C)->_storage/*4*/,a1,(C)->_upper/*12*/);
  844. return R;
  845. }
  846. /*No:FIXED_ARRAY[RUN_FEATURE_5].upper*/
  847. /*No:FIXED_ARRAY[RUN_FEATURE_5].clear*/
  848. /*No:FIXED_ARRAY[RUN_FEATURE_5].capacity*/
  849. /*No:FIXED_ARRAY[RUN_FEATURE_5].put*/
  850. /*No:FIXED_ARRAY[RUN_FEATURE_5].storage*/
  851.  
  852.  
  853. void r384with_capacity(T384* C,T2 a1){
  854. /*[IF*/
  855. if(((C)->_capacity/*8*/)<(a1)){
  856. C->_storage=calloc(a1,sizeof(T0*));
  857. C->_capacity=a1;
  858. }
  859. /*FI]*/
  860. C->_upper=-(1);
  861. }
  862. /*No:FIXED_ARRAY[TYPE_REF_TO_EXP].clear_all*/
  863.  
  864.  
  865. void r384add_last(T384* C,T0* a1){
  866. T2 _new_capacity=0;
  867. /*[IF*/
  868. if((((C)->_upper/*12*/)+(1))<=(((C)->_capacity/*8*/)-(1))){
  869. C->_upper=((C)->_upper/*12*/)+(1);
  870. }
  871.  else if(((C)->_capacity/*8*/)==(0)){
  872. C->_storage=calloc(2,sizeof(T0*));
  873. C->_capacity=2;
  874. C->_upper=0;
  875. }
  876. else{
  877. _new_capacity=(2)*((C)->_capacity/*8*/);
  878. C->_storage=r385realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  879. C->_capacity=_new_capacity;
  880. C->_upper=((C)->_upper/*12*/)+(1);
  881. }
  882. /*FI]*/
  883. /*[IRF3.5put*/((C)->_storage/*4*/)[(C)->_upper/*12*/]=(a1);
  884. /*]*/
  885. }
  886. /*No:FIXED_ARRAY[TYPE_REF_TO_EXP].item*/
  887. /*No:FIXED_ARRAY[TYPE_REF_TO_EXP].set_all_with*/
  888. /*No:FIXED_ARRAY[TYPE_REF_TO_EXP].count*/
  889.  
  890.  
  891. void r384resize(T384* C,T2 a1){
  892. T0* _elt_default=NULL;
  893. T2 _i=0;
  894. T2 _new_capacity=0;
  895. /*[IF*/
  896. if((a1)<=(/*(IRF4.6count*/((C)->_upper/*12*/)+(1)/*)*/)){
  897. C->_upper=(a1)-(1);
  898. }
  899. else{
  900. _new_capacity=a1;
  901. /*[IF*/
  902. if(((C)->_capacity/*8*/)<(_new_capacity)){
  903. /*[IF*/
  904. if(((C)->_capacity/*8*/)==(0)){
  905. C->_storage=calloc(_new_capacity,sizeof(T0*));
  906. }
  907. else{
  908. C->_storage=r385realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  909. }
  910. /*FI]*/
  911. C->_capacity=_new_capacity;
  912. }
  913. /*FI]*/
  914. _new_capacity=(C)->_upper/*12*/;
  915. C->_upper=(a1)-(1);
  916. _i=(C)->_upper/*12*/;
  917. while (!((_i)==(_new_capacity))) {
  918. /*[IRF3.5put*/((C)->_storage/*4*/)[_i]=(_elt_default);
  919. /*]*/
  920. _i=(_i)-(1);
  921. }
  922. }
  923. /*FI]*/
  924. }
  925.  
  926.  
  927. void r384make(T384* C,T2 a1){
  928. /*[IF*/
  929. if((a1)==(0)){
  930. C->_upper=-(1);
  931. }
  932.  else if(((C)->_capacity/*8*/)==(0)){
  933. C->_storage=calloc(a1,sizeof(T0*));
  934. C->_capacity=a1;
  935. C->_upper=(a1)-(1);
  936. }
  937.  else if(((C)->_capacity/*8*/)<(a1)){
  938. C->_storage=calloc(a1,sizeof(T0*));
  939. C->_capacity=a1;
  940. C->_upper=(a1)-(1);
  941. }
  942. else{
  943. C->_upper=(a1)-(1);
  944. /*[IRF3.6clear_all*/{T384* C1=C;
  945. T0* __value=NULL;
  946. /*[IRF3.6set_all_with*/{T384* C2=C1;
  947. T0* c1=__value;
  948. r385set_all_with((C2)->_storage/*4*/,c1,(C2)->_upper/*12*/);
  949. }/*]*/
  950. }/*]*/
  951. }
  952. /*FI]*/
  953. }
  954. /*No:FIXED_ARRAY[TYPE_REF_TO_EXP].upper*/
  955. /*No:FIXED_ARRAY[TYPE_REF_TO_EXP].capacity*/
  956. /*No:FIXED_ARRAY[TYPE_REF_TO_EXP].put*/
  957. /*No:FIXED_ARRAY[TYPE_REF_TO_EXP].storage*/
  958.  
  959.